<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            border: 1px  solid;
            background-color: darkorange;
            cursor: move;
        }
    </style>
</head>
<body>
    <!-- 移动鼠标，盒子可以在页面中飞 -->
     <div class="box"></div>
     <script>
        let box = document.querySelector('box')
        let boxWidth = box.offsetWidth; 
        let boxHeight = box.offsetHeight;
     </script>
</body>
</html>